const HttpUtil = require('../utils/httpUtil')
export function getNews(typename){
    // console.log("typename:"+typename)
  return HttpUtil.request({
    url:'https://apis.tianapi.com/'+typename+'/index',
    data:{"key":"c7fedcc034a78d2c336f9edded27b396","num":"10"},
    method:'get',
  })
}
export function getNewsType(){
    return HttpUtil.request({
      url:'https://apis.tianapi.com/channellist/index',
      data:{"key":"c7fedcc034a78d2c336f9edded27b396"},
      method:'get',
    })
  }
  export function getSearchNews(word){
    return HttpUtil.request({
      url:'https://apis.tianapi.com/generalnews/index',
      data:{"key":"c7fedcc034a78d2c336f9edded27b396",'num':30,'word':word,'rand':1},
      method:'get',
    })
  }

  export function networkHot(){
    return HttpUtil.request({
      url:'https://apis.tianapi.com/networkhot/index',
      data:{"key":"c7fedcc034a78d2c336f9edded27b396"},
      method:'get',
    })
  }